#include "move.h"

Move::Move() {
	this->Clear();
}

void Move::Clear() {
	this->ToCount = 0;
}

void Move::ClearComplete() {
	this->ToCount = 0;

		for(int i = 0; i < 12; i++) {
		this->To[i] = 0;
	}
}

bool Move::Equal(Move* move1, Move* move2) {
	if(move1->Player != move2->Player) return false;
	if(move1->From != move2->From) return false;
	
	if(move1->ToCount != move2->ToCount) return false;
	for(int i = 0; i < move1->ToCount; i++) {
		if(move1->To[i] != move2->To[i]) return false;
	}

	if(move1->CapturedCount != move2->CapturedCount) return false;
	for(int i = 0; i < move1->CapturedCount; i++) {
		if(move1->Captured[i] != move2->Captured[i]) return false;
	}

  return true;
}